package com.vinoxm.rss.model;

import com.google.common.base.Objects;
import lombok.AllArgsConstructor;
import lombok.Data;

@Data
//@ToString
@AllArgsConstructor
public class RssTracker {
    private Long id;
    private String host;

    public RssTracker() {}

    public RssTracker(String host) {
        this.host = host;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        RssTracker that = (RssTracker) o;
        return Objects.equal(host, that.host);
    }

    @Override
    public int hashCode() {
        return Objects.hashCode(host);
    }
}
